#include <stdio.h>

int main1() {
	int arr[10];
	int i = 0;
	for (i = 0; i < 10; i++) {
		scanf_s("%d", &arr[i]);
	}

	int max = arr[0];
	int min = arr[0];
	for (i = 1; i < 10; i++) {
		if (arr[i] > max)
			max = arr[i];
		if (arr[i] < min)
			min = arr[i];
	}

	printf("%d\n", max - min);
	return 0;
}